package eggfly.demo;

public class Main {
//    private static final String S1 = "S1";
//    private static final String S2 = "S1";
//    private static final String S3 = "S1";
//    private static final String S4 = "S1";
//    private static final String S5 = "S1";
//    private static final String S6 = "S1";
//    private static final String S7 = "S1";
//    private static final String S8 = "S1";
//    private static final String S9 = "S1";
//    private static final String S10 = "S1";
//    private static final String S11 = "S1";
//    private static final String S12 = "S1";
//    private static final String S13 = "S1";
//    private static final String S14 = "S1";
//    private static final String S15 = "S1";
//    private static final String S16 = "S1";
//    private static final String S17 = "S1";
//    private static final String S18 = "S1";
//    private static final String S19 = "S1";
//    private static final String S20 = "S1";
//    private static final String S21 = "S1";
//    private static final String S22 = "S1";
//    private static final String S23 = "S1";
//    private static final String S24 = "S1";
//    private static final String S25 = "S1";
//    private static final String S26 = "S1";
//    private static final String S27 = "S1";
//    private static final String S28 = "S1";
//    private static final String S30 = "S1";
//    private static final String S31 = "S1";
//    private static final String S32 = "S1";

    public static void main(String[] args) {
        long value = test(-1, 5);
        System.out.println("Hello ToyVM! Recursive calculation result: ");
        System.out.println(value);
    }

    private static long test(int step, long value) {
        if (value == 0) {
            return 0;
        }
        return 1000 + test(step, value + step);
    }

    private native static int testNative();
}
